package com.photoeditor.demo.app;

import android.content.Intent;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.View;

import com.common.base.app.BaseFragment;
import com.photoeditor.demo.model.bean.ThumbnailBean;
import com.photoeditor.demo.ui.adapter.gallery.ICheckedChangeListener;
import com.photoeditor.demo.ui.adapter.gallery.IOnFragmentChange;
import com.photoeditor.demo.ui.adapter.gallery.ListGridAdapter;

/**
 * Created by winn on 17/4/14.
 */

public class XFragment extends BaseFragment {

    protected ICheckedChangeListener mActivityListener;

    protected IOnFragmentChange mDataListener;

    protected boolean mIsPageSelected;

    public boolean isNeedRefresh = false;

    public boolean isCreated = false;

    public void onPageSelected() {
        mIsPageSelected = true;
    }

    public void onPageUnSelected() {
        mIsPageSelected = false;
    }

    public boolean isPageSelected() {
        return mIsPageSelected;
    }

    public boolean dispatchTouchEvent(MotionEvent ev) {
        return false;
    }

    public void onNewIntent(Intent intent) {}

    public void onMoveClick(View v) {}

    public void onCancelClick(View v) {}

    public void onShareClick(View v) {}

    public boolean onBackClick(View v) {
        return false;
    }

    public void onDeleteClick(View v) {}

    public boolean onKeyDown(int keyCode, KeyEvent event) {
        return false;
    }

    public boolean onKeyUp(int keyCode, KeyEvent event) {
        return false;
    }

    public void onActivityResult(int requestCode, int resultCode, Intent data) {}

    public ListGridAdapter getAdapter() {
        return null;
    }

    public void doOnStart() {}

    public void startImagePreviewActivity(ThumbnailBean bean, int requestCode) {}

    public void refreshData() {}

    public void forceRefreshData() {}

    public void setNeedRefresh(boolean flag) {
        isNeedRefresh = flag;
    }

    public int getImageNum() {
        return 0;
    }

    @Override
    public void onResume() {
        super.onResume();
    }

    @Override
    public void onPause() {
        super.onPause();
    }

}
